package com.naiterui.ehp.bp.domain;
// default package

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * DocMedicationGrpDetail entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "dr_medication")
public class Medication implements java.io.Serializable {


	private static final long serialVersionUID = 363717756202924140L;
	
	private Long id;
	private Integer addNum;
	private Date createdAt;
	private Date changedAt;
	
	

	/**
     * 创建Medication实例
     * @throws 异常信息
     */
	public Medication() {
        super();
    }

    /**
     * 创建Medication实例
     * @param id
     * @param addNum
     * @throws 异常信息
     */
	public Medication(Long id, int addNum) {
        super();
        this.id = id;
        this.addNum = addNum;
        this.createdAt = new Date();
        this.changedAt = new Date();
    }

    @Id
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}


	@Column(name = "add_num")
	public Integer getAddNum() {
		return addNum;
	}

	public void setAddNum(Integer addNum) {
		this.addNum = addNum;
	}

	@Column(name = "created_at")
	public Date getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	@Column(name = "changed_at")
	public Date getChangedAt() {
		return changedAt;
	}

	public void setChangedAt(Date changedAt) {
		this.changedAt = changedAt;
	}

}